#include <Material.hpp>

Modeling::Material::~Material()
{}

Modeling::Material::Material(std::string name) : diffuseMap(NULL)
{
	this->setName(name);
	this->setShininess(0.1);
}

std::string Modeling::Material::getName()
{
	return this->name;
}

void Modeling::Material::setName(std::string name)
{
	this->name = name;
}

Modeling::RGBf* Modeling::Material::getAmbient()
{
	return &this->ambient;
}

void Modeling::Material::setAmbient(Modeling::RGBf ambient)
{
	this->ambient = ambient;
}

Modeling::RGBf* Modeling::Material::getDiffuse()
{
	return &this->diffuse;
}

void Modeling::Material::setDiffuse(Modeling::RGBf diffuse)
{
	this->diffuse = diffuse;
}

Modeling::RGBf* Modeling::Material::getSpecular()
{
	return &this->specular;
}

void Modeling::Material::setSpecular(Modeling::RGBf specular)
{
	this->specular = specular;
}

float Modeling::Material::getShininess()
{
	return this->shininess;
}

void Modeling::Material::setShininess(float shininess)
{
	this->shininess = shininess;
}

Modeling::Map* Modeling::Material::getDiffuseMap()
{
	return this->diffuseMap;
}

Modeling::Map* Modeling::Material::enableDiffuseMap()
{
	if (this->diffuseMap == NULL)
		this->diffuseMap = new Modeling::Map();

	return this->diffuseMap;
}

bool Modeling::Material::isDiffuseMapEnabled()
{
	return this->diffuseMap == NULL;
}
